# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-boltons
_pkgname=boltons
pkgver=25.0.0
pkgrel=1
pkgdesc='Functionality that should be in the standard library. Like builtins, but Boltons.'
arch=('any')
url='https://pypi.org/project/boltons/#files'
license=('BSD')
depends=('python')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('4a1c9a511d5628c21c0416f289260f0dcbf4ebc38338d8dbf2d9a7ee8031b5d69c74ca6f5bc0a97fee1773a6e86fdb470af9b643f0c0b89db23987fe842dff4f')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

